package com.itheima.service;

import com.itheima.entity.PageResult;
import com.itheima.entity.QueryPageBean;
import com.itheima.pojo.User;

import java.util.List;

public interface UserService {
    public User findByUsername(String username);

    public User findById(Integer id);

    //分页查询
    public PageResult pageQuery(QueryPageBean queryPageBean);

    //新增
    public void add(User user, Integer[] roleIds);

    //删除用户
    public void delete(Integer id);

    //根据用户id查询关联的权限
    public List<Integer> findRoleIdsByUserId(Integer id);

    //编辑
    public void edit(User user, Integer[] roleIds);
}
